﻿<%@ WebHandler Language="C#" Class="captcha" %>

using System;
using System.Web;

public class captcha : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "image/gif";
        string code = string.Empty;
        new CaptchaGender().GenCaptcha(context, 100, 20, out code).Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif);
        context.Session["Code"] = code;
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}